function HandleSmryProduce(gui, item, options) {
  this._gui = gui;
  this._item = item;
  this._options = options;
  this._popupBox = new PopupBox();

  this._args = (options && options.args) ? options.args : [];
  
  this._createElements();
};

HandleSmryProduce.prototype._createElements = function() {
  this._loadData();
};

HandleSmryProduce.prototype._loadData = function() {
  this._smry = null;
  this._retrieveSmry();
};

HandleSmryProduce.prototype._verifyData = function() {
  if (this._smry) {
    this._updateElements();
  }
};

HandleSmryProduce.prototype._retrieveSmry = function() {
  var _self = this;
  new RequestUtils()._mysql('smry', '&a=' + encodeURIComponent(JSON.stringify(this._args)), function(result, params) { _self._smry = result;
                                                                                                                       _self._verifyData.call(_self);
                                                                                                                     }, { php: Constant.FACTORY + '/customphp/mysqlcustom.php' });
};

HandleSmryProduce.prototype._updateElements = function() {
  var div, span, tmp, _self = this;
  DlmanageUtils.clear(this._gui);
  
  for (var key in this._gui) {
    span = this._gui[key];
    if (!span) {
      continue;
    }
    tmp = this._smry[span.id];
    if (tmp.total != 0) {
      span.appendChild(document.createTextNode(', '));
      
      var a = document.createElement('a');
      a.href = '#';
      a.appendChild(document.createTextNode(tmp.total + 'customers'));
      a._tmp = tmp;
      a.onclick = function() { var div = document.createElement('div');
                                var pos = DOMUtils.findPos(this);
                                var func1 = function() { _self._popupBox._close(); };
                                MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                new DialogCustomerInfo(div, tmp, null);
                                return false;
                              };
  
      span.appendChild(a);
    } else {
      span.appendChild(document.createTextNode(', ' + tmp.total + 'customer'));
    }
  }
};